home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 895 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: lrz-muenchen.de!sun2!ua302aa
  2. From: ua302aa@sun2.lrz-muenchen.de (Kurt Watzka)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: A problem with fprintf
  5. Date: 9 Jan 1996 14:32:09 GMT
  6. Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
  7. Distribution: world
  8. Message-ID: <4ctu99$96b@sparcserver.lrz-muenchen.de>
  9. References: <4cs8ie$5ru@no-names.nerdc.ufl.edu> <4csrrr$f06@gryphon.phoenix.net>
  10. NNTP-Posting-Host: sun2.lrz-muenchen.de
  11.  
  12. brucew@phoenix.net (Bruce Wedding) writes:
  13.  
  14. >vtigadi@cis.ufl.edu (Vishwajit Tigadi) wrote:
  15.  
  16. >>I have a piece of code where the following statement fits in:
  17. >>
  18. >>fprintf(fp, "%s\n", src);
  19.  
  20. >>signal SEGV (segmentation violation) in malloc at 0xef778634
  21. >>malloc+0x150:   st      %o0, [%l5]
  22.  
  23. >Are you checking the return value of malloc()?  Show us the code with
  24. >the malloc in it.
  25.  
  26. He need not even know that there is a function called malloc(). The
  27. library can call library functions, too, and in this case we can
  28. suspect that there is a call to malloc() hidden in the implementation
  29. of fprintf().
  30.  
  31. Kurt
  32. --
  33. | Kurt Watzka                             Phone : +49-89-2180-6254
  34. | watzka@stat.uni-muenchen.de
  35. | ua302aa@sunmail.lrz-muenchen.de
  36.